Storage devices typically include a non-volatile memory (“NVM”) for storing various types of data, and a memory controller that manages the NVM. The memory controller performs storage operations on the memory (i.e., writing and reading data, etc.) by using a file system that is stored in the NVM. Conventional memory controllers of NVM-based storage devices can make changes to the file system in response to storage commands that they receive from host devices with which they operate, but they cannot initiate changes in the file system independently of the host device. In order for a host device to be able to operate with a storage device, the host device reads information from the storage device, which allows it to locally use a representation of the storage device file system to read data, write data, etc., that is stored in the storage device.
A host device initiates changes in the file system residing in the storage device, for example, when it writes data into the storage device. A storage device may initiate changes in the file system when it performs internal activities such as logging its own activities, storing secure content that is received through an ‘out-of-band’ connection (e.g., ASSD, which is an industry standard connection) that is established between the storage device and a network server, automatically discarding consigned content when user-content is written into the memory of the storage device, moving data or files from one memory partition to another, etc.
If a storage device independently makes changes in its file system, the host device does not necessarily recognize these changes and, therefore, it may inadvertently overwrite them. For example, the host device may overwrite these changes when it writes its own changes into the storage device file system. The file system residing in the storage device and the representation of the file system residing in the host device must be synchronized, regardless of which party initiated changes in the file system, in order to prevent file system inconsistencies. If the file system in the storage device and its representation in the host device are not synchronized, the host device and the storage device cannot function properly.
There is therefore a need to address the problem of de-synchronization of the file system and its representation when the storage device initiates changes in the file system. There is also a need to synchronize changes that are initiated by the storage device and changes that are initiated by the host device to ensure that one coherent file system is used by both parties.